<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script>
</head>

<body >
	<div class="container" ng-app="myApp">
		
		<div class="row body-area">
			<div class="col-xs-3" ng-controller="menuCtrl">
				<div class="panel panel-default">
					<!-- 鍦ㄨ繖閲屽惊鐜坊鍔犲悗绔繑鍥炴潵鐨勬暟鎹紝 <a href={{menuItem.href}}>鏄璺宠浆鐨勯〉闈㈢殑閾炬帴锛寋{menuItem.name}}鏄璺宠浆鐨勯〉闈㈢殑鍚嶇О-->
					<div class="panel-heading">鍔熻兘鑿滃崟</div>
					<ul class="list-group" ng-repeat="menuItem1 in menuItem">
						<li class="list-group-item"><a href={{menuItem1.href}}>{{menuItem1.name}}</a></li>
					</ul>
				</div>
			</div>
		
		</div>
	</div>

	<script>
	var app = angular.module('myApp',[]);
		app.controller('menuCtrl', function($scope, $http) {
			$http({
				method : 'GET',
				url : '/sideMenu'
			}).then(function successCallback(response) {
				//alert("dgfug");
				alert(JSON.stringify(response.data));
				$scope.menuItem = response.data;
			}, function errorCallback(response) {
				alert("ufhduhfi");
				console.log(response)
				console.log('failer')
				// 璇锋眰澶辫触鎵ц浠ｇ爜
			});
		});
	</script>
	<!-- <script>
		//涓嶇煡閬撹繖涓槸骞插槢鐨勶紝鐧惧害涓�涓嬭兘涓嶈兘鍒犳帀
		$('#home').addClass('active')
	</script> -->
</body>
</html>